﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using DAL;
namespace BLL
{
    public   class GoodsBLL
    {
        GoodsDAL gdl = new GoodsDAL();
        public bool GoodsAdd(string goodsname, string goodstype, int goodsnum, int goodsprice, string  goodsjtime, string goodzhuant)    //添加
        {
            int a= gdl.GoodsAdd(goodsname, goodstype, goodsnum, goodsprice, goodsjtime, goodzhuant);
            if (a>0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        public DataTable show()  //显示dgv
        {
            return gdl.show();
        }
        public DataTable cxgoods(string goodsname, int allgoods,int goodsxiajia)  //模糊查询
        {
            
            return gdl.cxgoods(goodsname, allgoods, goodsxiajia);
        }
        public bool goodsModify(string goodsname, string goodstype, int goodsnum, int goodsprice, string goodsjtime, string goodszhuant, int id)
        {
           
            int a= gdl.goodsModify(goodsname, goodstype, goodsnum, goodsprice, goodsjtime, goodszhuant, id);
            if (a>0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        public DataTable Modifyshow(int id)//修改查询
        {            
            return gdl.Modifyshow(id);
        }
        public bool mModifyDel(int id)    // 删除用户
        {
           
            int a= gdl.mModifyDel(id);
            if (a > 0)
            {
                return true;

            }
            else
            {
                return false;
            }
        }
    }
}
